<? foreach ($questions['instructions']['content'] as $content) {
    if ($content['type'] == 'D') {
        ?>
        <h5> <strong><? echo $content['description'] ?></strong></h5>
    <? }
    
}?>
<div class="col-md-12 text-center">
    <?	
foreach ($questions as $item) {
        if ($item['type'] === 'D') {
        
            foreach ($item['choices'] as $choice) {
			   $rchoice[] = $choice['answer'];
            } 
        }
    }shuffle($rchoice); 
	 foreach ($rchoice as $choice) {
		echo '<strong>'.strtoupper($choice).' </strong>';
            }?>
    </div>
        &nbsp;
<div class="input-group input-group-sm">
    <?
    $number = 1;
    foreach ($questions as $item) {
        if ($item['type'] === 'D') {
            ?>
            <? echo $number . '. ' . $item['question']; ?>
            <? foreach ($item['choices'] as $choice) { ?>
                <input onkeydown="return alphaValidator(event);" type="text" class="form-control"  name='<? echo $secureid= substr(md5(rand()), 0, 7).$choice['answer_id'] ?>'/><br><br>
            <? } ?>
            <?
            $number+=1;
            $num_of_questions += 1;
        }
    }
    ?>
</div>